home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / man / lib.fmt / c / putc.man < prev    next >
Encoding:
Text File  |  1989-01-25  |  1.8 KB  |  67 lines

  1.  
  2.  
  3.  
  4. PUTC                  C Library Procedures                   PUTC
  5.  
  6.  
  7.  
  8. NNAAMMEE
  9.      putc, putchar, fputc, putw - put character or word on a
  10.      stream
  11.  
  12. SSYYNNOOPPSSIISS
  13.      ##iinncclluuddee <<ssttddiioo..hh>>
  14.  
  15.      iinntt ppuuttcc((cc,, ssttrreeaamm))
  16.      cchhaarr cc;;
  17.      FFIILLEE **ssttrreeaamm;;
  18.  
  19.      iinntt ppuuttcchhaarr((cc))
  20.  
  21.      iinntt ffppuuttcc((cc,, ssttrreeaamm))
  22.      FFIILLEE **ssttrreeaamm;;
  23.  
  24.      iinntt ppuuttww((ww,, ssttrreeaamm))
  25.      FFIILLEE **ssttrreeaamm;;
  26.  
  27. DDEESSCCRRIIPPTTIIOONN
  28.      _P_u_t_c appends the character _c to the named output _s_t_r_e_a_m.  It
  29.      returns the character written.
  30.  
  31.      _P_u_t_c_h_a_r(_c) is defined as _p_u_t_c(_c, ssttddoouutt).
  32.  
  33.      _F_p_u_t_c behaves like _p_u_t_c, but is a genuine function rather
  34.      than a macro.
  35.  
  36.      _P_u_t_w appends word (that is, iinntt) _w to the output _s_t_r_e_a_m.  It
  37.      returns the word written.  _P_u_t_w neither assumes nor causes
  38.      special alignment in the file.
  39.  
  40. SSEEEE AALLSSOO
  41.      fopen(3S), fclose(3S), getc(3S), puts(3S), printf(3S),
  42.      fread(3S)
  43.  
  44. DDIIAAGGNNOOSSTTIICCSS
  45.      These functions return the constant EEOOFF upon error.  Since
  46.      this is a good integer, _f_e_r_r_o_r(3S) should be used to detect
  47.      _p_u_t_w errors.
  48.  
  49. BBUUGGSS
  50.      Because it is implemented as a macro, _p_u_t_c treats a _s_t_r_e_a_m
  51.      argument with side effects improperly.  In particular
  52.  
  53.      putc(c, *f++);
  54.  
  55.      doesn't work sensibly.
  56.  
  57.      Errors can occur long after the call to _p_u_t_c.
  58.  
  59.  
  60.  
  61.  
  62.  
  63. Sprite v1.0             November 6, 1985                        1
  64.  
  65.  
  66.  
  67.